package com.pmg;

public class MyThread extends Thread{
	private int delay;
	private String id;
	public MyThread(int delay, String id){
		super(id);
		this.delay = delay;
		this.id = id;
	}
	
	public void run(){
		int i = 0;
		while(true){
			try {
				sleep(this.delay);
				new Delay().setLabel(id+i);
				i++;
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}
}
class Delay{
	private String label;
	public void setLabel(String label){
		this.label = label;
	}
	
	public String getLabel(){
		return this.label;
	}
}
